FUNCTION
decimal.to_text
function to_text(): textConvert this decimal to a base 10 text representation.
Since
0.9.1
Convert this decimal to a base 10 text representation, optionally using scientific notation (also
called standard form), e.g. 6.0221E+23.
The general output format when scientific notation is used is mEsn, where m represents a
non-zero coefficient, E is the literal character, s represents the sign (either + or -),
and n represents the exponent.
Note that the maximum number of decimal places for the coefficient is 20, and therefore any
precision beyond this in the original decimal value is lost.
Parameters
- scientific — If
true, the output will use scientific notation. Iffalse, decimal representation will be used.
Since
0.9.1
© 2026 Chromia